<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>
    <!-- 编写一份标记语言文档 -->
    <!-- js函数以显示用户想要查看的图片 -->
    <!-- 在标记语言文档里触发一个调用js图片显示的函数 -->
    <!-- 对js函数的功能进行扩展，这需要用到几个新的dom方法 -->
    <div >
        <h1>Snapshots</h1>
        <ul class="cl ">
            <li>
                <a data-href="./img/1.webp" href="#" title="tubian1" onclick="showPic(this); ">tubian</a>
            </li>
            <li>
                <a data-href="./img/2.webp" href="#" title="tubian2" onclick="showPic(this); ">tubian</a>
            </li>
            <li>
                <a data-href="./img/3.webp" href="#" title="tubian3" onclick="showPic(this); ">tubian</a>
            </li>
            <li>
                <a data-href="./img/4.webp" href="#" title="tubian4" onclick="showPic(this); ">tubian</a>
            </li>
        </ul>
        
        <div class="box">
            <p id="description">标题</p>
            <img src="" alt="图片" id="placeholder">
        </div>
    </div>
    <script src="./js/index.js"></script>
    <script>
        window.onload = countBodyChildren
    </script>
</body>

</html>